package io;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

/**
 * @description: ToDo
 * @author: marin
 * @time: 2020/7/2 12:28
 */
public class FileInput {
    public static void main(String[] args) {
        try {
            FileInputStream fs = new FileInputStream("test3.txt");
            byte[] bytes = new byte[2];
            int len = 0;
            while ((len=fs.read(bytes)) != -1){
                System.out.println(new String(bytes));
            }
            fs.close();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
